import type { FC } from 'react'
import React, { useCallback } from 'react'
import { useTranslation } from 'react-i18next'
import type { NodeProps } from 'reactflow'
import { NodeSourceHandle } from '../_base/components/node-handle'
import { isEmptyRelatedOperator } from './utils'
import { WaitNodeType } from './types'
import { Condition } from '../if-else/types'
import ConditionFilesListValue from '../if-else/components/condition-files-list-value'
import ConditionValue from '../if-else/components/condition-value'
const i18nPrefix = 'workflow.nodes.ifElse'

const WaitNode: FC<NodeProps<WaitNodeType>> = (props) => {
  const { data } = props
  const { t } = useTranslation()

  return (
    <div className='px-3'>
      <div className='relative flex items-center h-6 px-1'>
        <div className='w-full text-xs font-semibold text-right text-text-secondary'>TimeOut</div>
        <NodeSourceHandle
          {...props}
          handleId='false'
          handleClassName='!top-1/2 !-right-[21px] !-translate-y-1/2'
        />
      </div>
    </div>
  )
}

export default React.memo(WaitNode)
